From: Matthieu Gallien Date: Tue, 22 Apr 2025 09:14:07 +0000 (+0200) Subject: feat: better logs when a file cannot be removed X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2^2~11^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=59f7c7653798e0e0e39a8931562576c3b036218c;p=nextcloud-desktop.git feat: better logs when a file cannot be removed should log the reason why a file cannot be deleted Signed-off-by: Matthieu Gallien --- diff --git a/src/common/filesystembase.cpp b/src/common/filesystembase.cpp index b63f6c1a7..7ab136b42 100644 --- a/src/common/filesystembase.cpp +++ b/src/common/filesystembase.cpp @@ -595,6 +595,7 @@ bool FileSystem::remove(const QString &fileName, QString *errorString) if (errorString) { *errorString = QObject::tr("File is already deleted"); } + qCWarning(lcFileSystem()) << "File is already deleted" << fileName; return false; } } @@ -603,6 +604,7 @@ bool FileSystem::remove(const QString &fileName, QString *errorString) if (errorString) { *errorString = QString::fromLatin1(e.what()); } + qCWarning(lcFileSystem()) << e.what() << fileName; return false; } catch (...) @@ -610,6 +612,7 @@ bool FileSystem::remove(const QString &fileName, QString *errorString) if (errorString) { *errorString = QObject::tr("Error deleting the file"); } + qCWarning(lcFileSystem()) << "Error deleting the file" << fileName; return false; }